Added mouse implementation and detection