Adding a basic delete_page function and adding more error handling

Change-Id: I802590b1a3d1a05ed353b1c43730b570b8f679c2