Functional tests

+ more tests overall