Small adjustments.

Refactoring mostly.