Remove unused methods, add more comments to the code