Change access modifiers and fix R# warnings