Doing some refactoring. Much cleaner, but can definitely do more.