[IMP] Working SWAP memory W\ some memory leaks