@NotNull and small cleanup