Added some new features to the build flow and handled SQL better