Switch to synchronous reset, rename FSM states, make clock dividers generic