Patch by Wincent Balin: convert pdbox from app to viewer