Implemented the spec builder and adapted the rendering algorithm to it