First commit of code

Not fully debugged, use at own risk…