now featuring subject and scope from codes table
added new subject and scope fields, streamlined code