added mvc structure, cleaned up front end, cleaned up unused code