Cleaning up the appd script