Implemented onSharedPreferenceChangedListener

App now detects when a preference is changed and adjusts variables
accordingly. No more need to restart the service whenever a preference
is changed.