lint suggestions + memory leak fix