Refactor the linearactuator C++ lib