[WIP] Improving functional tests