basis.net: cleanup and simplify code