Reduced main function by eliminating a struct.