Fix transitions to lesshat version
Smoother resize events

The code looks bloated but the heavy lifting part is still extremely
small and fast.