Added input several layers of input validation. Updated docs