Refactor monolithic switch statements
onmousedown for UX