Moved some stuff around to make it tidier