Compiler from c89 to c99 changed. Errors of global variables fixed
Global vars initialization added
Some changes in motor API