Store boolean values not 1 or 0 for boolean types

Signed-off-by: Michal Čihař <michal@cihar.com>
Use class attribute instead of passing the value as parameter

Signed-off-by: Michal Čihař <michal@cihar.com>