#16 add layout model, improvements to add edit delete logic