clean up CodeGenMonad
reduced CodeGenMonad to minimum
warnings
add if-then-else and while