Some code refactoring; Request and Response classes added;