Make setBearing public and clean up code style