Code quality

Mostly formatting/consistency and eslint tests.