Fixes according to supervisor's suggestions.