removed duplicate code
external book opening code moved to openBookIntenal
compilation issues
synchronization with beta branch
Merge branch 'master' into beta