added macros, refactored module/code stuff

cleaned up some formatting
Removed scheme.go

Too hard to keep up to date. Will re-introduce later.