clean up and code commenting