edited js and updated readme to reflect

: added dir variable to make settings easier to manage