Added documentation and made public methods final and added validation