refactored client code
added tests to capture ie is working fix
moved code around so we can in borwser test - on setup server