Added clean phase. License and documentation updated.