Cleaning up if logic action and removing unrequired generics