Removed possiblity of SQL injection, optimized query method with find_each instead of each to keep memory from being emptied. Completed model association and added inverse option to keep models in sync