Layout changes and bug fixes