split JS into separate file, move manual to Readme