logic tweaks, and updated layout formatting