Cleaned up the code which resolves validation errors