Refactor away from huge dictionary