Fix flakes8 errors (except some E501 line too long)