Initial code

Working fine. Missing nice argument parser etc. etc.