fixes bugs
refactoring - added application controller