Convert constructor to accept an array of options