Refactoring: added annotations @NotNull and @Nullable and 'final' to declarations