added memoize_sync and updated macro code...this closes [#2]