Refactor some shiz.