Refactoring

Hi,

Just some refactoring, nothing exciting.

Regards, Martin.