Check app name (fixed)

Some fixes & refactoring