Fixed ios5 crash
Added states to characters
Added algorithm for level result