Updated to remove mongoose dependency.