Refactoring parse of generic parameters