Added cache to improve performance
Code clean