refractor + bug fixes