Added chainable configuration functions, added Close()