Adding comments and deleting obsolete code