added some front end and back end cleanup