Merge "Add helper functions and Kosmos classes" into main