Refactor and cleanup some dirty code