Cleaned up subroutine calling sequences. No more variable sized arrays
declared within subroutines.