Cleaned up imports and added guard against short requests in router