Updated functions and code layout.