Moved js to it's own file