Refactored alot of code to be more restful. addressed most comments