Fix and refactor casperjs scenarios.