Try and refactor for nice, more manageable code