Adding main loop

Looping for messages and updating state. Empty entities list added