Refactoring

Make code clearer