More fleshing out of base modules and subroutines