Added Facebook tests, fix some functions