A bunch of commits

This is a rather large chunk of commits which I just finished merging back into your branch, when testing this out at first I did not realize it was still being updated so I didn't think to merge and changes back until recently.

I believe I managed to structure out all the changes reasonably well so hopefully from looking at the commits it should be possible to see what changes have been done ( there does seem to be some problem with the dates though since I had to use git cherrypick to merge back the changes). If it is to confusing to get to grips with, I can see if I can fix it up.

In any case all unit tests are passing for me and my own project is working fine as well.