minor cleanup
Added a flags property on the builder...

Flags property for tracking distinct, limit, offset, etc.
Added a 'type' on the JoinClause object, other minor changes