Implemented some comments from Joeri.