added .error callback. more calls to .info callback
fixes #6
some tidy up and renaming
fixes #5
added comments regarding #6