[system] Clean up code