changed tabs to spaces
refactored pybf following pylint analysis