F-algebra refactor, just for fun