Refactored the code for ceiling gen(still not working yet), but also an improvement to ground gen.