Clean up the remains of the old implementation and some mistakes