strstrip: optimizations and safety, need to figure out tests
Move printbits to a header