Move protobuf implementation to new basis.proto module