Layout of framework, and improvements on efficiency and speed