Adds a base monad for the generator.

This way errors can be handeled correctly and the options are availible everywhere.
Changes the Builder monads to have RawGen as base.
Changes the error in Code.Module to throwError.
Reformats the main.
Merge branch 'monad' into develop