added final modifiers to some methods and classes