Moved queue functions to their own C file.
Added print queue function.