Update messages. Move script tags into head tag for local scripts. Increase version to 3.1.1