Rewrote character code, added new actions