added deconstructing test for defapp
started on protocol for apps