added requested API commands for mobile device
minor code refactoring