Added function app(); fixed tests; updated namespaces;