Add tests and refactor FIXME and OPTIMIZE