Lots of code cleanup.
Object invocation and listeners changes.