Added a utility class, few functions, and improved the comments.