Added initialization of the BinarySerializer to the constructor so it is possible to "pre-initialize"