Merging dev

Minor improvements to formatting, tested.