Refactored settings to it's own file
Fixed a bug with the extension detection