Started refactoring and move to separate repo.