Simplify relative mouse code