jpsevents.lua

Since you said you're going to merge htordeux changes by hand...
Here are the changes I made...seem to reduce memory increase a little...I guess the
```local eventtable = {...}``` which was in the code before wasn't a good idea...

The old code is still there, but currently commented out - can be deleted later on