Applied layout and added javascript