Move database execution methods to extension methods
Some code cleanup