Removed all statement closing copypaste in private close method.