Use HABTM instead of has_many-through. Also adding indicies.