Finished restructure and removed old

Also added promises and caching