This is just a simple queue data structure for javascript that has efficiency improvements over using an array