Kyle's review and clean up of code