Tests

Added tests for models. 
Use metadata for shared contexts.