Small restructure and fixes in curves