Refactor with namespace and multiple files