Added comments and other minor changes