Namespaces & Lambda

removed namespaces and improved lambda captures