Coding style cleanup, view.js still to do, broken state.