Optimize last apps retrieval & clean and indent