Fix bugs and NAMESPACE issues
Update merge conflicts