more refactoring. moved initialization into it's own file.