Use namespace; misc. refactoring.