Small refactoring done on MyQueue class