Refactor states using uirouter for clarity