Eliminated almost all the compile errors (for now)