structure change and couple other small fixes