Changes in software architecture, added picture of state machine, edited nodes picture