level and event system refactoring (ns)