code clean up
Use service to handle events
improve UI
bug fix