config changes merged from Neo
merges from Neo, event implementation and tidying.