Refactor license from string to object