Updated the code. Added more comments and examples