Refactoring

Tidying up