Made ByteArrayRef serializable (otherwise a lot of serialization exceptions on tomcat boot)