Moved js to separate files