Cleaned and renamed functions
Added settings class