Refactor the builder

* clears markers right away now
* avoid duplicated logic as much as possible
* batch up the marker creations for greater efficiency
* perform a clean and full build when compiler settings are changed