v0.6.6 Fixed permissions and code refactorization of main