Added comments and documented main class