Added tests, edited stuff

Added tests for the export-method, changed some structural aspects and
fixed a bug