Move szBOM constant arrays to where they're actually used.
Declare as static some functions used only within the external viewers module.
Split options saving to a module.