Implemented clean and reset for the MaterialLib. Also added functions to the Application to end or hard reset it.