Updated APIWrapper to move map creation out of constructor.