refactored lots of variables, removed excess files