Added new methods, changed comments, refactoring