Done some refactoring and commenting and implemented way for better
inter-process communication between service and activity