fixed request handlers not working properly
added main handler for application