speed-up frequency searches, layout fixes