Layout changes and code clean-up