Added dynamic resizing, instructions in js