Refactored and implemented 3Tier architecture