First half-working version.