some small fixes, added primitives for command line controllers