Reorganized browser JS. Refs #14