How best to use a custom module?

getting all my code into one course file is not an option.

Perhaps I will try to put my modules into a package.

I found the core of my issue relates to this unsolved thread: