Moved PFS structures into module. Moved some utils around.