Topic/phase shift

The bits from PR#4 not involving utf8...