Updated layout and added env check