Restructured library headers and rewrote STL converters