Offloaded some functions, much cleaner now