Fix encoding and the "dot"

fixes #1 and a couple compile warnings.