Added the bind method and merged @gavinsimpson's upstream pull #154

@gavinsimpson can you look at the `bind` function, it goes back to using `class` to pull out class information, not sure if the use is counter to what you were trying to do in #154.