Missing declarations
Remove all flush/transaction commits.
Rework subject filtering since it is now a tuple.
Refactor due to changes in dao and subject being a tuple now.