fix karma test. rm unused code