Fixing compile errors and stuff