Finally get mongodb to work, and fixes name validation bug