put js in separate file; center array in browser window

pay no attention to the readme file changes.