Refactored gpio, changed navigate behaviour to avoid conflicts between Extensions, js tidy