Fixed missing end script tag. Moved main js into index to force synchronous execution for meow