Refactoring + minor UI