Cleaned up various fragments and fixed a compilation error that occured when switching metric container.