Creates integration test 
+ found bugs + fixed it :P