This is just for misc functions.

Moved other functions into specific modules.
Split functions into separate modules.

This addresses issue #1.