Initial dirty js commit - refactor required