Add documentation scheme and some code refactoring.