restructuring app slightly