rejig module hierarchy and clean up docs