Sounds like you may have infectious acute bronchitis. Brown phlegm and the "horrible taste" suggest that your infection may be bacterial. Being a non-smoker, this bronchitis will most likely resolve on its own. However, the resolution of your illness and symptoms would probably be hastened by treatment with an antibiotic.
I forgot to mention that I am a non-smoker -- I haven't ever smoked.