Final after VALGRIND check
FINAL 1.0 version with NO ERRORS in VALGRIND and with COMMENTS