Moved javascript to main file.