Complete restructure into a more modular form