More structure and some code