Complete refactor!