Refactored. Deleted lots of code.