a bit of codestyle and one missing copyright
fix variant type parsing