Added functional tests
Small changes