Added support for custom named ID fields

Pull request for #48