Improve byteaccess API; always define custom classes