de-unittested & simplified
clean up imports
de-unittested lists
de-unittested control statements
split control statements into conditionals & loops
removed truthiness
de-unittested dicts