Improved healthcheck method detection (now usable for other methods than healthcheck as well.