Initial formatting and defines updated

Added a documentary header, and some defines and new formatting.