Updated to use hatch, started to add more elegant error handling