* refactor test setup to return struct rather than many values * changes to code style from review * apply diff from Leandro for logging
* refactor test setup to return struct rather than many values * changes to code style from review * apply diff from Leandro for logging