changed order of parameters
improved output formatting
Implemented SDF loader with string stream

Needs polishing without tmp variable. #1