Cleaned up commented out code and imports. Api responds better to requests with missing input.