* Updated the IDs of error messages
* Updated the logic of checking whether an element exists
* Removed some unused methods