Added ahelper function for retreving bool and int. Inline these functions.