Intermediate update to move everything to namespace, plus some stylistic fixes