Add butterfly trapped stuff

It now tests whether a butterfly is trapped or not

Also fixed a few flags