Added more branch/reference methods.  Made error handling more robust.