minimial code clean up. Moved unused code to archive for now.