Unfinished changes to flatview