cleanup; blog function
begin of structurizing the code
added LICENCE