performance improvements: added db indexes + more strict field types