refactor to use namespaces and proper class naming