Fixed karma testing, closes #4