Major restructure - no longer working need to fix