Basic structure and some working code