Some code cleanup

Removed some old/unused code portions.