Refactoring and cleanup
Declares BufferedSql classes as final