Finish constructor and tests for it.