documents and reorganizes the compiler code - part 2

adds more documentation and and coding style uniformity (ref issue #57) for the compiler part