added javadoc comments. Added the methods for device verification. Added error handling in callbacks.