New code base + debuging, backtrace, logging & more

Replace the entire code base with something much better. Now has better
debuging, backtrace method calls, logging.