Added custom binary support, removed various minor warnings