added html encoding, completed delete functionality