Updated code for selection layouts.  About to add in delta encoding.