Fix layout, fix bugs and filter record exits