builder: refactor builder stuff