refactor packeges and files