Organize and clean code