Moved thumb logic to its own module