Add testing and karma support; update docs