Fix memory leak if handle failed to be created.
Add @raise tag to the init method.
Minor changes, travis-ci should work now.