Added basic dequeue code to be reviewed and revised