More modular code for lineup generation