RR: tidy up. Removing obsolete stuff and checking.