fixed tests and initial gradle support