Now usese Date.now():
Removed unused function.
Started a refactor of window events.
refactored and rewritten window.close.