Added send input validation and Improved design.