Modifying classes: endSession function for closing the POS