Create Post HTML and Script refactored. The script is now in seperate file and loads correctly.