Implemented Queue, and some cleanup

Signed-off-by: Faiz Kothari <faiz.off93@gmail.com>