Syntax fixes, added capitalised Self type, added lots of code snippets