refactor struct declarations