Add automatic test cases, fix kimulem and dij