Making js in separate file so it's cleaner