Complete application refactor.
Major refactor.