Add basic argument checking
Improve app tests