first work on Firefox OS compatibility, some optimizations and enhancements
Merge pull request #3 from SunboX/master

first work on Firefox OS compatibility, some optimizations and enhancements