Adminotech bugfixes pt. 7

Bugfixes so far. Well be adding more stuff here, for now its just for people to review and keep things transparent as we go.

We'd prefer waiting Lasse to get all his code in (txml id change and mathgeolib update). We will that code here and then we can look at merging our fixes. This can be done closer to the next rex release or when this gets too bloated :)