lock data structures before destruction
remove unused orientation handling from library