Implemented Matthias' suggestions.