Remove global functions.  They are no longer necessary.
Fixes #41
Fixes #42
Fixes #43
Fixes #44