Jf/refactor