Implemented Davide's suggestions.