Fixing app loading and removal.
Adding test helpers and fixing events emit.