Merge pull request #158 from mtnlife999/master

added event handler and cleaned up touch sample
updated the javascript interface to better handle properties