Add comments and documentation
delete unused files