Additional refactoring; fixed an issue with binary data in object scope