fix all code error, the behaviour is not correct yet. but there are non JS errors
remove absolute paths from debug html and added more debug statements