Updated dependencies
Refactored and cleaned up erorrs