Create quark.class.php

Suggested improvements welcome. 
Screwed this up royally the first time.