add _ref suffix to all reference fields + fix semicolons