fix warnings
make RawHandler into a template