Made some checks include underline calculation

Removed debug code