Completely refactored everything