Constructor refactor and some tests.