restructure for functional tests, use CasperJS