Adds Flow Layout (adapted from JNW's earlier version)