Massive refactor & restructure.