add mousedown effects on buttons and refactor more