Added more comments, added exception and trying to use it effectively.