Fixed formatter errors
Added #union, #unionAll
Refactored