Moved javascript code to a separated file + fixed src path