Documented the code better
Documented the code better and added util code