Moved javascript to individual files