Refined variables and added layout