Loads of changes. Added  custom post type but maybe not needed.