minor tweaks, fixed formatting and tests