Started refactoring functionality I didn't like