Fixed warnings, add protocol