initial refactor
cleanup
merge