Feature/functional tests

Fix #69 
Fix #70