Changed return type from void to bool for many functions