Queue implementation functional, minor bug fixes