Refactoring of main() and MessageSystem
Engine is initially built