Could you update this to use the new browser app object, it will allow you to remove several lines of code. :)