cleanup code and documentation
simplify bookmark-transfer-function