#3 done, documentation updated, code cleaning