minor improvements for frontend JS