FIX: error gen cross conditions+minor pep8 corrections