Applied DRY practice to Queue and Stack classes, using List class at their core.