Refactor; cleanup