made goodness tests and value assignment a bit modular, few random fixes
Automatic style corrections courtesy of autopep8