Implemented basic DB2 checks and minor refactoring