There is another cause of a starter motor turning but not engaging the the flywheel on the motor.
This is if you have the Black/Yellow wire on the wrong post on the solenoid.
There should be two small posts on the solenoid...one has the Black/Yellow wire which is +12 volts when you turn ignition to ON and the other is a Black/Green wire which is for the unloader relays.
Make sure these are the correct way around.
Sparks coming from the starter motor indicate a bad winding on the rotor so every time that section of the winding comes under the brushes at the commutator ring...sparks happen!