Added support manual setup of output scaling (using the low level lib_object() interface). Minor stylistic changes.