Issue 58 and some minor tweaks