Fixed inaccessible close method + some small fixes