Added persistant preferences (using java.util.prefs)
Ensured that onActivate and onDeactive don't get run when already (de)activated.
1st cut demo game using bean shell