Preferences are not saving - fix by Konstantin Marmalyukov
Some refactoring to allow code reuse from CordovaSim Eclipse plugins