Added some indexes
Added clearBelongsTo method
Moved tag and relation loading into main database read loop