Updated comments and cleaned up dead code