Little refactor for tools panel.

There have many things to do with this feature. Oh, my god.

Change-Id: I4ee7e4e9dafce9a5d382f66ccb37c6fa1a09e0fe