Fix some compile errors. Some adapting for Orbit.