Setting access modifiers correctly