Added some test-case. Works, but the result contains an excessive amount of indent symbols. To be continued ...