Working 3-tier implementation.