Cleaned up layout code and messages