Enable stickyClass by data attribute or settings

Plus general code refactoring