began cleaning reg code, add detail from spec