refactor some loops to foreachs
refactor buttons
add analytics events for scrambling/solving