Some refactoring. Nothing new here really