Fixed the changes that were deleted in the last commit.
Added MasterQueue.

Did not integrate it yet.
Integrated the new MasterQueue class.
Removed whitespace.