Refactored js modal views, etc.