Throughout there are cases where you've left no spaces between control structures like `for(...){...}` and `if(...){...}` but there are also cases where there is extra spacing between such as `if (...) { ... }`.

I'd suggest using the original libraries style here as we intend to submit a pull request back. If it turns out there was no consistency in the original library then we/you should have a quick chat about the best way to standardise with other frontend folks.