refactor tests, add a application helper spec