added license header
fixed javadoc formatting
moved javascript to js file