Performance improvement on Open, solving minor code issues