backend review and small fixes [~=PEP8]