Restructure plus addition of tests
Fixed permissions