declared helper functions

Declared the prototypes for the helper functions used in some of the
test functions.

at this point, only SimpleTrainTest() can be executed without any bugs.
formatting changes

changed some of the formatting