Added comments and some code.