CSS fix for inconsistent box sizes. A little JS refactoring.