Added tests for discrete and linalg