move subprotocols into their own src folders. clean up Makefile.am. minor bug fixes.