Refactored some stuff...