Moved some stuff around, cleaned up the action queue code a bit