Refactors and tooltip position fix