Loads of fixes, TODOs and comments.