Added isEmpty() and isFull() methods and changed append and serve functions to make use of them