Added functionality to put on Blackberry 10 device. Cleaned code a bit.