TONS of fixes, very few global variables ect