Rectangle packing algorithm javascript. Can I have more clarification on this as well.