Some improvements to solution also

Cherry-picked "Some improvements" and adjusted some very minor things to the solution