Initial implementation

Implemented this while learning PyQt4, so it's in 'barely working' state. Still, good enough for a start, I guess.