Refactor some stuff...