Paule added lnitial version

Added logic for the initial version
Some cleanup

Cleanup