Refactoring SQLForm