Remove deprecated methods / function
Fix query count, imports
Code cleanup
Remove unused import
Merge pull request #3570 from yakky/feature/remove_deprecations

Remove deprecated methods / function