added karma tests and changed grunt configuration to concatinate tests and code so that browserify can pick up deps from public code area. also slight cleanup of the xhr request module