Refactoring tab code

It looks better, but it’s not ideal.

Fix: #7.