Update the sample module to comply with the latest changes.
Consolidated and simplified the module API system. Various other fixes and improvements.