glashaus: Split build logic into helper classes