Added comments, some class renaming & refactoring