Added some usefull helpers to the testing framework
Fixed some minor BUG and added tests