Light refactor of viewport.js
Keep the quantity field empty