Fixed problem with trying to save empty data on >2 variation tests. A
few comments and stylistic code changes