src: more refractor
misc: some refractor