Delete file implemented. Bug fixes.