Completed implementation of queue struct