cleaned up some code. continued to remove unneeded code