Cleaned up 'FANCY' implementation