Introduced a view manager to handle the memory issue