Some working code.. albeit horrible in impelemntation.