refactoring
fix bug after refactoring
fixed metadata, fixed various bugs
Merge pull request #1 from Leon-G/refactoring

Refactoring