restructured some javascript functions.  looked into issue with addon reloading when ip is wrongly identified as online then goes offline again
Merge pull request #91 from elcabong/Dev

restructured some javascript functions.  looked into issue with addon re...