Almost ready, tide up and separated in functions, using temporal dirs
ready for testing and deploying