Changes + new files

We changed some functions in different files and wrote some new scripts.