Build main framework.