Added a custom table checkbox header
Extracteded methods to make code readable