working, refactored to different files, started on ml_request_simple for API use and testing.