remove C casts
staff lines from staffDef
page cast off and other fixes