More porting to D. Renamed shared to common. Shared is a key word in D.