Moved logic into separate class, tested over network instead of localhos...

...t

As title says!