Added testing scripts
Some research applied
Some changes