Added more flexible constructor options