updated form classes, updatedpdo and mongo DB classes, some refactoring