Added some inline documentation, and deleted unused files