Adopt file to python3 syntax. Move settings to other file. Add bgpq3 support.