Based upon Jerry's codebase.