behat tests + helper fns; tweaks to codebase to accommodate behat...