Added comments and defined constants