Refactor icon pathes.

Move icon path detection into own classes and test it.