reorg some files and put magic numbers in constants