I'm a bit scared by this huge chunk of code, with little readability - I'm not saying it was better before
Aligning all the : and type would help a bit I guess