Fixed remaining build errors
Refactored all DAOs to use try-with-resources