fixed some bugs in apps and libs. added new commands.