Made changes and refactored classes