Added some caching, fixed lf_ namespace