added clock manipulation
fixed errors
Moved script to js file
fixed string date bug