moved code to a js file
updated readme, moved source