FlameChart refactoring Part 1