Added structs to make code cleaner and more readable