Refactored everything into smaller files
Added missing dependency