Added multi-threading and some refactoring

Created my own ThreadPool and WorkerThread class instead of using the
java.util.concurrent package because this is a school project. I would
normally have used a FixedThreadPool, however this solution works fine
as well.