Cleaned up the request functionality