Fixed settings duplicates
Removed duplicated variables and applied some PEP8 enhancements

Signed-off-by: Carlos Oliveira <carlospecter@gmail.com>
Signed-off-by: Alexandre Barbosa <alexandreab@live.com>
Fixing flake8 warnings
Merge branch 'settings_fix' into 'master'

Settings fix