Move bool2int to end of file