Refactoring + additional features