Extended deadline funcionality.
Fixed various remaining issues.