WIP: removed jQuery callbacks
Code cleanup and use of signals for dispatching events