added getter methods in Tarval wrapper for mode and mode_Bu
optimizePhi should now optmize booleans aswell (needs testing though)