Added: first unit tests. Moved formula rendering to separate class