Cleanup of unused code