Implement Queue and tests