Cleaned up unused functions