a little refactoring to break the various parts of test_mlp into
functions.
This will hopefully make my life easier in the future.

Other changes:
* upped the connection attempts in deploy