put functions into a cpp file (rather than jammed in the header)
auto formatting on example code
moved functions into separate cpp, organized code a little better
updated cbp file to include new cpp file