Reorganising build query interface
Added updateBuildStatus to database
Remove build database code to rework.