code cleanup: use consistent return types
code cleanup: fixed missing modules and namespaces