First visualization of sending pieces.

Move Javascript to main.js.