Added a separate algorithms module.
Fixed problem 37: eliminated extra output.
Added problem 38.
Fixed template: main is now callable.