Improving Software Reliability for Event-Driven Mobile Systems