TODO: add indices to foreign keys
add comments. TODO: make comments nested