Fix UI bugs, clean up code, initial FB integration