First version that passes basic integration/functional tests