ship factory refactor. Code clean up