Added facebook friends code and moved javascript to a separated file.