Fixing most comments from Bastiaan's review