code cleanup and expose request input and response output as importable stdin stdout
errors