Started to refactor the framework.