The first major refactor!