Now stores modifier states

also minor code tidy up