cleaned up and added comments and licenses