Changed main loop to terminate on != 0 instead of on 0
Added functions to wrap sending events
Merge branch 'master' of https://github.com/rbellido/Project