Using code as foriegn key for lookups