handle URL_STATE
whitespace
PEP8 compliance