Major refactoring now.