Moved javascript to external file