added some comments and cleared out some code