some refactor work
some fixes
refactor + features