Fixed a threading bug which cause the application to launch several thousand threads.
It now checks if it is bellow the max allowed threads before starting new
threads.

Also fixed a potential problem by doing better error checking on a feed, to ensure
that it is not malformed.