Most stuff done. Added example.