Added all rest code for facts and the ability to create facts in the interface.