Refactor ngRaven