remove unused code including buggy flowLayout