Changes added, few enhancements, error handling