Tidied the code, with some optimization

Data.points should be Array rather than List