Added more tests, added callbacks and better usage trace functions