Yi - do big refactoring