Small JS refactor, introduction of Knockout, externalizing select config

- bit of backend cleanup