UserAgent class modified and added in layout