Moved stuff to functions. Broke include paths.
Fixed include paths
Made function arg strings less ambigious
managing merge conflicts