Fix logic, use box where applicable