Reorder and inline pointer/mouse checks