fix
Some refactoring