Refactoring

Adding Memoize decorator for future use