Fix/refactor