Support preferences

This Pull request adds support for preferences. 

Included issues:  
-  #2 - Add settings  
-  #3 - Save the settings