Remove redundant local cache & simplify some arry filtering