removed leftover code (shame on me), added more thorough check for checked.
took the checkboxes creation outside of config, added usage of labels, also checks for '[]', it should always be appended