Write majority of interaction code