First of hopefully many cleanup commits. No code changes (except
visibility), but classes are now organised into subpackages.