Refactor pathes

Move icon path detection into own classes and test it.