Add options hash on query.
Refactor query and has_many methods.