added option of LQR prec. matrix on static and dynamic variables; removal of scipy dependencies; cleanup