Refactored to new syntax. Added defaults. Added metadata