Small fix
Move merge to a separate class and use a priority queue instead of levels