Fix warnings about declaration access and final modifiers