Cleaned up module and added custom formatting for error messages
Cleaned up module and added custom formatting for error messages