moved javascript in own file.
Some AJAX calls work now.