Added comments, changed access level of some methods