Refactor the way units are loaded.