Compact and flexible device