Minor Refactoring

* Removing unused variables
* using proper constants in error messages
* static imports of all constants