Fix and test constructor, make map work.