bring over layout view
add replace option to layout view
a little cleanup of layout