Calculate outer dimensions of box

Also pacify jslint
Better style the demo