Drop script dependencies in favour of pure js