First big push to refactor code

Started to refactor the code into more sepaerate chunks.  Making
the filtering and transform functions as broad and general as possible,
so that they can be used in a variety of circumstances in the future.

Speficially, started to change how the main function calls the mean
filtering method, as well as how the mean filtering method acts (is
now void return type, a pointer to the array for the filtered image
is passed as an argument). Still have a ways to go until the code is
going to be compilable, but making steady progress.