Code cleanup and rearranging things for future work. Added support for 192 and 256-bit curves.