scale support, refactor, more docs