Reverted insert constructor to Sean's original code and made variables consistent with parameter list.