Initial code version with a lot of things left...
ToDo: doc!