Unit2: Problem 2 solution and added base handler class for common tasks.