Close to final

Everything included.
ToDo:
formating (if possible)