Rework message formatting, closes #174