Major refactor. Integrating performance metrics features from separate project named Slartibarfast