'editPart' method was getting overwritten by a variable of the same name, which is why I was getting 'number is not a function' error. Numbers are indeed not functions.