Fixed broken commit

Now attaches main modules using config.attach_namespace. I think I've forgotten what I was doing with config.
I really need to redo that whole part of this project.
Added error module framework

Allows implementations to set the log level, and automatically logs to the console (using log, warn, error),
and logs to an internal array, which can be easily manipulated later (for dumping to file or uploading to server)