fixed formatting
remove not neccesary outputs
added check-permission for deleting the page