Made config min/max optional, improved Python3 compatibility