Move setup into separate functions