finally cleaned up the api file, old queries file. Will be ready for atmo after I rework tests.