Modified to use with facebook
Lots of modifications :)