Fix compile errors and bad names