Add simplified structure, errorhandling, tests