Tidied up code, fixed some small API issues. 

Also added contributing stuff to it's own file, which is integrated into GH.