added method to update layout.txt when required, fixed a few typos