Refactor: Use tuple structs and tuple indexing