Best rev yet with respect to namespaces and overall code formatting. Some weirdness with blocks