Better input; better tracing; better JSON dumping
fix various issues for pylint's sake