added comments and removed obsolete code