Updated APIs to check if karotz is sleeping.
Code clean-up.
Support for sleep, wakeup, reboot, get_version, get_free_space.