Refactoring

My humble attempt to make the code look a liitle bit better.