Made this less of a complete mess. Next is to fix the warnings and maybe resume development