First working version
Improved settings