Made FirefoxOS compatible app
Some code enhancements and minor fixes