Add tests, create karma debug mode