Fix >1.0 usage with stats urls
Actually use port if its an option
Resolve code review comments

suggestion by @portertech for code quality
Merge pull request #567 from Ubiquiti-Cloud/es-heap-version-fix

Es heap version fix