Organize the code