Added new routes an better error handling