Use LocalProxy for lazy model references
Fix test
Clean up
Better constructor for models