Slight changes based on some suggestions by Olaf