Some layout & minor js bugfixes