add index collation; first pass at FK; fix type attr quotes; misc. fixes;