Fixed memory leak and a few files missing in the remote repo