reorg. clean up. optionize.