registered opclass and fixed compile errors