Restructure the code.