Wrapped the old event system for Swig/Lua use
Fixed cmakelists.txt