sorted out a lot of issues with type members