Moved javascript to local files