Added comments and made sure default values of parameters made sense