Some cleanup to layout file finally, removal of unneeded code, etc.