Clean-up of old comments and reorg of code