Update .gitignore to exclude .userprefs file, Mock all http requests for tests, Refactoring