Optimize
Use C++ templates
Split files