move all functions to case statement near EOF
rename internal function
remove extraneous comments
reorder internal functions
more verbose output if overlay module is not present