Added a cleanup function to System to handle any cleanup when it's removed