Converted to traits
upgraded to scodec rc2