Re-arranged some initialization orders. Made all of the layouts on pixel borders. Removed some dead code.