Refactor all of the stuffs