Fix & refactor