miscellaneous issue52 improvements

Just cleans up some of my previously merged code.