removed repeat code
clean up files
new object oriented js