Add some comments and refactor load method